<ion-header  class="nav-header">
  <ion-toolbar>
      <ion-buttons slot="start">
          <ion-button (click)="back()">
            <ion-icon class="md-arrow-back"  ios="md-arrow-back"></ion-icon>
          </ion-button>
        </ion-buttons>
    <ion-title>详细报表</ion-title>
  </ion-toolbar>
</ion-header>
<!-- 默认彩票的数据 -->
<ion-header *ngIf="!isT">
    <ion-grid class="todayfinish-header">
      <ion-row>
        <ion-col size="3">
          注单号
        </ion-col>
        <ion-col size="3">
          类型
        </ion-col>
        <ion-col size="2">
          玩法
        </ion-col>
        <ion-col size="2">
          下注
        </ion-col>
        <ion-col size="2">
          输赢
        </ion-col>
      </ion-row>
    </ion-grid>
  </ion-header>
<ion-content *ngIf="!isT">
  <ion-refresher slot="fixed" pullFactor="0.5" pullMin="100" pullMax="200" (ionRefresh)="doRefresh($event)">
    <ion-refresher-content></ion-refresher-content>
  </ion-refresher>
  <ion-grid class="todayfinish-list">
    <ion-row *ngFor="let item of dataList">
      <ion-col size="3">
        <p text-center>
          <ion-text class="text-blue">{{item.show_id | ordernodeal:dealDate}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.created | datestr}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.created | datestr:'t'}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="3">
        <p text-center>
          <ion-text>{{item.toplotname}}</ion-text>
        </p>
        <p text-center>
          <ion-text class="text-blue">第{{item.cycleid}}期</ion-text>
        </p>
        <p text-center>
          <ion-text class="text-blue">盘口{{item.region}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
            <ion-text class="text-blue"><span *ngIf="!(item.lotname | empty)">{{item.lotname}}/</span> <span
              [innerHtml]="item.depiction | html"></span></ion-text>
        </p>
        <p text-center>
          <ion-text><span class="text-blue">@</span><span class="text-red">{{item.rate}}</span></ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text>{{item.cash | decimal}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text [ngClass]="{'gree':!(item.result2 | isnegative),'red':item.result2 | isnegative}">
            {{item.result2 | decimal}}</ion-text>
        </p>
      </ion-col>
    </ion-row>
  </ion-grid>
  <ion-infinite-scroll threshold="100px" (ionInfinite)="loadMoreData($event)">
    <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="加载更多">
    </ion-infinite-scroll-content>
  </ion-infinite-scroll>
</ion-content>

<!-- 第三方 -->
<ion-header *ngIf="isT">
    <ion-grid class="todayfinish-header">
      <ion-row *ngIf="isAG">
        <ion-col size="3">
          注单号
        </ion-col>
        <ion-col size="3">
          类型
        </ion-col>
        <ion-col size="2">
          下注内容
        </ion-col>
        <ion-col size="2">
          下注
        </ion-col>
        <ion-col size="2">
          输赢
        </ion-col>
      </ion-row>
      <ion-row *ngIf="!isAG && isTag!='sg' && isTag!='ky' && isTag!='sw' && isTag!='ps'">
        <ion-col size="6">
          注单号
        </ion-col>
        <ion-col size="2">
          下注金额
        </ion-col>
        <ion-col size="2">
          有效金额
        </ion-col>
        <ion-col size="2">
          输赢
        </ion-col>
      </ion-row>
      <ion-row *ngIf="!isAG && (isTag=='ky' || isTag=='sw')">
        <ion-col size="4">
          注单号
        </ion-col>
        <ion-col size="2">
          类型
        </ion-col>
        <ion-col size="2">
          下注金额
        </ion-col>
        <ion-col size="2">
          有效金额
        </ion-col>
        <ion-col size="2">
          输赢
        </ion-col>
      </ion-row>
    </ion-grid>
    <ion-grid class="todayfinish-header" *ngIf="!isAG && isTag=='sg'">
      <ion-row>
        <ion-col size="3">
          注单号
        </ion-col>
        <ion-col size="3">
          类型
        </ion-col>
        <ion-col size="2">
          玩法
        </ion-col>
        <ion-col size="2">
          下注
        </ion-col>
        <ion-col size="2">
          输赢
        </ion-col>
      </ion-row>
    </ion-grid>
    <ion-grid class="todayfinish-header" *ngIf="!isAG && isTag=='ps'">
      <ion-row>
        <ion-col size="3">
          注单号
        </ion-col>
        <ion-col size="3">
          下注金额
        </ion-col>
        <ion-col size="3">
          有效金额
        </ion-col>
        <ion-col size="3">
          输赢
        </ion-col>
      </ion-row>
    </ion-grid>
  </ion-header>
<ion-content *ngIf="isT">
  <ion-grid class="todayfinish-list" *ngIf="isAG">
    <ion-row *ngFor="let item of thirdList">
      <ion-col size="3">
        <p text-center>
          <ion-text class="text-blue">{{item.order_no}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.bet_time | datestr}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.bet_time | datestr:'t'}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="3">
        <p text-center>
          <ion-text>{{item.game_name}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
            <ion-text class="text-blue"> <span
              [innerHtml]="item.bet_content | html"></span></ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text>{{item.money  | decimal}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text [ngClass]="{'gree':!(item.win | isnegative),'red':item.win | isnegative}">
            {{item.win | decimal}}</ion-text>
        </p>
      </ion-col>
    </ion-row>
  </ion-grid>
  <ion-grid class="todayfinish-list" *ngIf="!isAG && isTag=='sbo'">
    <ion-row *ngFor="let item of thirdList">
      <ion-col size="6">
        <p text-center>
          <ion-text class="text-blue">{{item.order_no}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.bet_time | datestr}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.bet_time | datestr:'t'}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text>{{item.money| decimal}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text>{{item.valid_money  | decimal}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text [ngClass]="{'gree':!(item.win | isnegative),'red':item.win | isnegative}">
            {{item.win | decimal}}</ion-text>
        </p>
      </ion-col>
    </ion-row>
  </ion-grid>
  <ion-grid class="todayfinish-list" *ngIf="!isAG && isTag=='ky'">
    <ion-row *ngFor="let item of thirdList">
      <ion-col size="4">
        <p text-center>
          <ion-text class="text-blue">{{item.order_no}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.bet_time | datestr}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.bet_time | datestr:'t'}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text>{{item.game_name}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text>{{item.money | decimal}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text>{{item.valid_money  | decimal}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text [ngClass]="{'gree':!(item.win | isnegative),'red':item.win | isnegative}">
            {{item.win | decimal}}</ion-text>
        </p>
      </ion-col>
    </ion-row>
  </ion-grid>
  <ion-grid class="todayfinish-list" *ngIf="!isAG && isTag=='sw'">
    <ion-row *ngFor="let item of thirdList">
      <ion-col size="4">
        <p text-center>
          <ion-text class="text-blue">{{item.order_no}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.bet_time | datestr}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.bet_time | datestr:'t'}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text>{{item.game_name}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text>{{item.money | decimal}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text>{{item.valid_money  | decimal}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text [ngClass]="{'gree':!(item.win | isnegative),'red':item.win | isnegative}">
            {{item.win | decimal}}</ion-text>
        </p>
      </ion-col>
    </ion-row>
  </ion-grid>
  <ion-grid class="todayfinish-list" *ngIf="!isAG && isTag=='sg'">
    <ion-row *ngFor="let item of thirdList">
      <ion-col size="3">
        <p text-center>
          <ion-text class="text-blue">{{item.order_no}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.bet_time | datestr}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.bet_time | datestr:'t'}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="3">
        <p text-center>
          <ion-text>{{item.game_name}}</ion-text>
        </p>
        <p text-center>
          <ion-text class="text-blue">第{{item.number}}期</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
            <ion-text class="text-blue"><span
              [innerHtml]="item.bet_content | html"></span></ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text>{{item.money | decimal}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="2">
        <p text-center>
          <ion-text [ngClass]="{'gree':!(item.win | isnegative),'red':item.win | isnegative}">
            {{item.win | decimal}}</ion-text>
        </p>
      </ion-col>
    </ion-row>
  </ion-grid>
  <ion-grid class="todayfinish-list" *ngIf="!isAG && isTag=='ps'">
    <ion-row *ngFor="let item of thirdList">
      <ion-col size="3">
        <p text-center>
          <ion-text class="text-blue">{{item.order_no}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.bet_time | datestr}}</ion-text>
        </p>
        <p text-center>
          <ion-text>{{item.bet_time | datestr:'t'}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="3">
        <p text-center>
          <ion-text>{{item.money | decimal}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="3">
        <p text-center>
          <ion-text>{{item.valid_money  | decimal}}</ion-text>
        </p>
      </ion-col>
      <ion-col size="3">
        <p text-center>
          <ion-text [ngClass]="{'gree':!(item.win | isnegative),'red':item.win | isnegative}">
            {{item.win | decimal}}</ion-text>
        </p>
      </ion-col>
    </ion-row>
  </ion-grid>
</ion-content>
<app-tab-self></app-tab-self>

